package com.example.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.example.domain.Certificate;

/**
 * @author 袁小弘
 * @describe 证书DAO层接口
 * @date 2020-01-01
 */
@Repository
public interface CertificateDao extends JpaRepository<Certificate, Integer> {

    @Transactional
    @Modifying
    int deleteByCertificateId(Integer certificateId);

    List<Certificate> findByCertificateId(Integer certificateId);

}
